import 'package:flutter/material.dart';
import 'package:flutter_practice/utils/Utils.dart';

///适合用来做 轮播图
class PageViewDemo extends StatelessWidget {
  final List<IconData> icons = [Icons.android, Icons.error, Icons.print];

  @override
  Widget build(BuildContext context) {
    // TODO: implement build

    return Scaffold(
      appBar: Utils.getAppBar('pageView'),
      body: Center(
        child: PageView.builder(
          itemBuilder: (BuildContext context, int index) {
            return Container(
              child: Icon(icons[index]),
            );
          },
          itemCount: icons.length,
        ),
      ),
    );
  }
}
